package cn.shengongying.api.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * @author : RXK
 * Date : 2021-7-24 18:02
 * Code Less Think More
 * Desc:
 */
@Getter
@Setter
public class PageInDTO extends IdInDTO{

    @ApiModelProperty(value = "页数,默认第1页")
    private Integer pageNo = 1;

    @ApiModelProperty(value = "每页条数,默认10条")
    private Integer pageSize = 10;

    public Integer offset() {
        return (pageNo - 1) * pageSize + (pageNo - 1);
    }


}
